package com.thp.comparable;

import java.util.Arrays;

public class TestCompare {
	public static void main(String[] args) {
		Strudent s1 = new Strudent(1, 20);
		Strudent s2 = new Strudent(2, 19);
		Strudent s3 = new Strudent(3, 18);
		Strudent s4 = new Strudent(4, 17);
		Strudent s5 = new Strudent(5, 16);
		Strudent s6 = new Strudent(6, 15);
		
		Strudent[] arr = {s2, s1, s6, s5, s4, s3};
		
		for(Strudent s : arr) {
			System.out.println(s.toString());
		}
		
		Arrays.sort(arr);
		
		System.out.println("----------------------");
		
		for(Strudent s : arr) {
			System.out.println(s.toString());
		}
	}
}
